/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package dep;

import java.awt.Font;
import java.awt.FontFormatException;
import java.io.IOException;
import java.io.InputStream;

/**
 *
 * @author xyBerWise
 */
public class f0ntl0ader {

    private InputStream instm;
    private Font nfont;
    private static f0ntl0ader _INSTANCE = null;

    public static synchronized f0ntl0ader getInstence() {
        if (_INSTANCE == null) {
            _INSTANCE = new f0ntl0ader();
        }
        return _INSTANCE;
    }

    private f0ntl0ader() {
    }

    public Font getFont(String FontName) {
        try {
            instm = this.getClass().getResourceAsStream("/fonts/" + FontName);
            nfont = Font.createFont(Font.TRUETYPE_FONT, instm);
            //    nfont.deriveFont(Font.PLAIN, 18f);
        } catch (FontFormatException e) {
            e.printStackTrace();
            return null;
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
        return nfont;
    }
}
